import React from 'react';
import action from '../store/actions/index';
class VoteFooter extends React.Component {
	render() {
		return <footer>
			<button onClick={this.handle.bind(this, 0)}>支持</button>
			<button onClick={this.handle.bind(this, 1)}>反对</button>
		</footer>;
	}
	handle = lx => {
		const { store } = this.props;
		if (lx === 0) {
			store.dispatch(action.vote.support(20));
			return;
		}
		store.dispatch(action.vote.oppose(10));
	};
}
export default VoteFooter;